package com.clss.commandhelper.function.casedetail;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;

import com.bumptech.glide.Glide;
import com.clss.commandhelper.R;
import com.clss.commandhelper.base.BaseActivity;
import com.clss.commandhelper.view.TouchImageView;


import butterknife.BindView;

/**
 * 查看图片
 * @author sonia
 * @date  2017/11/14
 */
public class ShowImageActivity extends BaseActivity {
    private static final String TAG = "ShowImageActivity";
    @BindView(R.id.touchImage)
    TouchImageView touchImage;
    private String path ;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    protected int setViewId() {
        return R.layout.activity_show_image;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData(@Nullable Bundle savedInstanceState) {
        Intent intent = getIntent();
        if(!TextUtils.isEmpty(intent.getStringExtra("pic"))){
            path = intent.getStringExtra("pic");
            Glide.with(this).load(path).into(touchImage);
        }else{
            showShortToast("未获取图片路径");
            finish();
        }
    }

    @Override
    public void responseError(int code, String msg) {

    }
}
